import { post, get } from '@/utils/request';

// 获取活动列表
export const getActiveList = () => {
  return get('/api/erp/erpActivity/list');
};

// 预约
export const addActiveList = (data: any) => {
  return post('/api/erp/erpPreOrder/add', data);
};

// 编辑预约信息
export const editorUserPre = (data: any) => {
  return post('/api/erp/erpPreOrder/edit', data);
};

// 用户已预约
export const getUserPreList = (data: any = {}) => {
  return get('/api/erp/erpPreOrder/list', data);
};

// 通过id查询预约详情
export const getUserPreById = (data: any = {}) => {
  return get('/api/erp/erpPreOrder/queryById', data);
};

// 订单列表
export const orderList = (data: any) => {
  return post('/api/erp/erpOrder/list', data);
};

// 下单
export const addOrder = (data: any) => {
  return post('/api/erp/erpOrder/add', data);
};

// 卡券列表
export const couponList = (data: any) => {
  return get('/api/erp/erpCouponRelate/list', data);
};

// 积分变动表
export const erpPointChangeList = (data: any) => {
  return get('/api/erp/erpPointChange/list', data);
};

// 积分产品表
export const erpPointProductList = (data: any) => {
  return get('/api/erp/erpPointProduct/list', data);
};

// 推荐产品表
export const listRandomProductList = (data: any) => {
  return get('/api/erp/erpCategoryTreeRelate/listRandom', data);
};

// 获取用户信息
export const getUserinfo = (data: any) => {
  return post('/api/erp/third/auth/userinfo', data);
};